/**
 * Copyright 2010-2025 The mTASK Project Authors. All Rights Reserved.
 * Licensed under the MIT License (the "License").  You may not use
 * this file except in compliance with the License.  You can obtain a copy
 * in the file LICENSE in the source distribution or at
 * https://www.gitee.com/lort/mTask/LICENSE.md
 * Author: luyunyi @luyunyi2019@outlook.com
 */

#ifndef __MTASKSINGLELIST_H__
#define __MTASKSINGLELIST_H__

#include <mTaskType.h>

#ifdef __cplusplus
extern "C"
{
#endif

struct mList{
    void *next;
    void *pre;
};

typedef struct mList    mList_t;
typedef struct mList    mListNode_t;

void mListInsertFront(mList_t *root, mListNode_t *node);
void mListInsertTail(mList_t *root, mListNode_t *node);
mListNode_t* mListDetachNode(mList_t *root, mListNode_t* node);
mListNode_t* mListDetachFront(mList_t *root);
mListNode_t* mListDetachTail(mList_t *root);
void mListRemoveNode(mList_t *root, mListNode_t *node);
int mListCountNode(mList_t *root);

#ifdef __cplusplus
}
#endif


#endif /* MAIN_ELOOP_ELOOP_LOG_H_ */


